<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航分类菜单</title>
    <link rel="shortcut icon" href="__PUB__/favicon.ico">
    <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__CSS__/page.css" rel="stylesheet">
    <script  src="__JS__/jquery.min.1.8.1.js" ></script>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>导航分类列表</h5>
                        <div class="ibox-tools">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="{:U('Nav/cat_ad')}" title ="添加">
                                <i class="fa fa-file-text-o"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-3">
                            <form action="{:U('Nav/cat_lst')}"  method ="post" >
                                <div class="input-group">
                                    <input type="text" placeholder="请输入分类名称" class="input-sm form-control" name ="search"> 
                                    <span class="input-group-btn">
                                       <input type="submit" class="btn btn-sm btn-primary" value="搜索" />
                                    </span>
                                </div>
                            </form>
                            </div>
                        </div>
                        <form action="{:U('Nav/cat_del_both')}"  method ="post"  >
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <thead>
                                    <tr>
                                        <th><input type="checkbox" class="i-checks" id="checks_both" /></th>
                                        <th>分类ID</th>
                                        <th>分类名称</th>
                                        <th>分类标签</th>
                                        <th>状态</th>
                                        <th>发布日期</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <volist name="list" id="vo">
	                                <tbody>
	                                    <tr>
	                                        <td>
	                                            <input type="checkbox"  class="i-checks ckeck"name="del_both[ ]" value="{$vo.id}" />
	                                        </td>
	                                        <td>{$vo.id}</td>
	                                        <if condition="$vo.level eq 0">
	                                        <td>{$vo.name}</td>
	                                        <else/>
	                                        <td>|--{$vo.name}</td>
	                                        </if>
	                                        <td>{$vo.tags}</td>
	                                        <td>
		                                       <if condition="$vo[status] eq 1">
													<span style="color:Green">已显示</span>
		                                       <else/>
		                                       		<span style="color:red">未显示</span>
		                                       </if>
	                                        </td> 
	                                        <td>{$vo.createtime|date ="Y-m-d H:i:s",###}</td>
	                                        <td> 
	                                        <a href="{:U('Nav/cat_edt',array('id'=>$vo['id']))}"title ="修改"><i class="fa fa-edit text-navy"></i></a>&nbsp;&nbsp;
	                                        <a href="{:U('Nav/cat_del',array('id'=>$vo['id']))}"title ="删除"><i class="fa fa-times text-navy" onclick="return confirm('确定要删除吗？');"></i></a>
	                                        </td>
	                                    </tr>
	                                </tbody>
                                </volist>
                            </table>
                        </div>
                        <input type="submit" value="全部删除" onclick="return confirm('您确定要删除这些吗？');"class ="btn btn-sm btn-primary "/>
                        </form>
						
						<div class ="pagination">{$page}</div>
						
                    </div>
                </div>
            </div>

        </div>
    </div>
 
    <script>
  
    	$("#checks_both").click(function(){
       	 if($(this).attr("checked")){
    			$(".ckeck").attr("checked","checked");
    		}else{
    			$(".ckeck").removeAttr("checked");
    		}
    	})
    </script>

</body>
</html>
